package com.xbongbong.pro.sharepermission.pojo;

import com.xbongbong.paas.domain.entity.PaasStageEntity;
import com.xbongbong.paas.enums.FieldTypeEnum;
import com.xbongbong.paas.field.FieldAttrEntity;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.List;
import java.util.Map;

/**
 * 设置页日志保存，字段转换方法入参封装类
 *
 */

@Getter
@Setter
@ToString
public class SharePermissionMidPojo {
    public SharePermissionMidPojo(Map<String, FieldAttrEntity> allFormExplainMap, String corpid, Integer businessType, Integer saasMark, Long formId, Map<String, String> allUserMap, Map<Long, String> allDeptMap, Map<String, PaasStageEntity> stageEntityMap, Map<Long, String> stageProcessVerMap) {
        this.allFormExplainMap = allFormExplainMap;
        this.corpid = corpid;
        this.businessType = businessType;
        this.saasMark = saasMark;
        this.formId = formId;
        this.allUserMap = allUserMap;
        this.allDeptMap = allDeptMap;
        this.stageEntityMap = stageEntityMap;
        this.stageProcessVerMap = stageProcessVerMap;
    }

    public SharePermissionMidPojo(String corpid, Map<String, String> allUserMap, Map<Long, String> allDeptMap, Map<String, PaasStageEntity> stageEntityMap, Map<Long, String> stageProcessVerMap, Map<Long,String> linkValueMap) {
        this.corpid = corpid;
        this.allUserMap = allUserMap;
        this.allDeptMap = allDeptMap;
        this.stageEntityMap = stageEntityMap;
        this.stageProcessVerMap = stageProcessVerMap;
        this.linkValueMap = linkValueMap;
    }

    /**
     * 设置的值（入库的值，不是回显值）
     */
    List<Object> value;

    /**
     * 表单解释map
     */
    Map<String, FieldAttrEntity> allFormExplainMap;

    /**
     * 字段attr
     */
    private String attr;

    /**
     * 子表单字段attr
     */
    private String subAttr;

    /**
     * 字段类型
     */
    private FieldTypeEnum fieldTypeEnum;


    /**
     * 字段类型
     */
    private FieldAttrEntity fieldAttrEntity;


    /**
     * 公司id
     */
    private String corpid;

    /**
     * 业务类型
     */
    private Integer businessType;

    /**
     * saas标记
     */
    private Integer saasMark;

    /**
     * 表单id
     */
    private Long formId;

    /**
     * 用户id,名字map
     */
    private Map<String, String> allUserMap;

    /**
     * 部门id,名字map
     */
    private Map<Long, String> allDeptMap;

    /**
     * 阶段推进字段code,名字map
     */
    Map<String, PaasStageEntity> stageEntityMap;

    /**
     * 阶段流程id,版本名称map
     */
    Map<Long, String> stageProcessVerMap;
    /**
     * dataId,关联key的值 map
     */
    Map<Long,String> linkValueMap;
}
